﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;

namespace KALE_Scanning {
    public partial class frmPassword : Form {
        public frmPassword() {
            InitializeComponent();
        }

        private void btnLoginSettings_Click(object sender, EventArgs e) {
            string outgoingUserName = txtUserName.Text;
            string outgoingPassword = txtPassword.Text;
            if (outgoingUserName == Crypt.Decrypt(ConfigurationSettings.AppSettings[Crypt.Encrypt("UserName")]) && outgoingPassword == Crypt.Decrypt(ConfigurationSettings.AppSettings[Crypt.Encrypt("Password")]))
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            else
                this.DialogResult = System.Windows.Forms.DialogResult.No;
        }
    }
}
